<!--
 * @Author: daidai
 * @Date: 2022-02-28 16:16:42
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-07-20 17:57:11
 * @FilePath: \web-pc\src\pages\big-screen\view\indexs\left-center.vue
-->
<template>
  <ul class="user_Overview" v-if="pageflag">
    <Echart
      :options="options"
      id="bottomLeftChart"
      class="echarts_bottom"
    ></Echart>
  </ul>
  <Reacquire v-else @onclick="getData" line-height="200px">
    重新获取
  </Reacquire>
</template>

<script>
import { currentGET } from "api/modules";
let style = {
  fontSize: 18,
};
export default {
  data() {
    return {
      options: {},

      pageflag: true,
    };
  },

  created() {
    this.getData();
  },

  beforeDestroy() {
    this.clearData();
  },
  methods: {
    clearData() {},
    getData() {
      this.pageflag = true;
      this.options = {
        tooltip: {
          trigger: "axis",
          axisPointer: {
            type: "shadow",
          },
        },
        grid: {
          left: "2%",
          right: "2%",
          top: "2%",
          bottom: "2%",
          containLabel: true,
        },
        series: [
          {
            type: "pie",
            radius: [30, "60%"],
            center: ["50%", "50%"],
            roseType: "radius",
            color: [
              "#C1232B",
              "#B5C334",
              "#FCCE10",
              "#E87C25",
              "#27727B",
              "#FE8463",
              "#9BCA63",
              "#FAD860",
              "#F3A43B",
              "#60C0DD",
              "#D7504B",
              "#C6E579",
              "#F4E001",
              "#F0805A",
              "#26C0C0",
            ],
            data: [
              {
                value: 26,
                name: "茶几",
              },
              {
                value: 21,
                name: "床柜",
              },
              {
                value: 19,
                name: "斗柜",
              },
              {
                value: 17,
                name: "大床",
              },
              {
                value: 17,
                name: "电柜",
              },
            ],
            label: {
              normal: {
                textStyle: {
                  fontSize: 14,
                },
                formatter: function (param) {
                  return param.name;
                },
              },
            },
            labelLine: {
              normal: {
                smooth: true,
                lineStyle: {
                  width: 2,
                },
              },
            },
            itemStyle: {
              normal: {
                shadowBlur: 30,
                shadowColor: "rgba(0, 0, 0, 0.4)",
              },
            },

            animationType: "scale",
            animationEasing: "elasticOut",
            animationDelay: function (idx) {
              return Math.random() * 200;
            },
          },
        ],
      };
    },
  },
};
</script>
<style lang="scss" scoped>
.user_Overview {
    width: 100%;
  height: 100%;
    .echarts_bottom {
        width: 100%;
        height: 100%;
    }
 
}
</style>
